package com.quanyan.pay.api.wechat.vo;

import com.quanyan.common.utils.StringUtil;
import com.quanyan.pay.vo.WxBaseReqVo;
import com.thoughtworks.xstream.annotations.XStreamAlias;

import javax.validation.constraints.NotNull;

/**
 * Created by Zheng.Ke
 * Date 2017/2/15.
 * 具体参见文档 https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_13&index=9
 */
@XStreamAlias("xml")
public class WxAuthCodeToOpenIdReqVo extends WxBaseReqVo {
    /** 应用APPID */
    @NotNull
    private String appid;
    /** 商户号 */
    @NotNull
    private String mch_id;
    /** 授权码 */
    @NotNull
    private String auth_code;
    /** 随机字符串  */
    private String nonce_str = StringUtil.genRandomCode(32, false).toUpperCase();

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getMch_id() {
        return mch_id;
    }

    public void setMch_id(String mch_id) {
        this.mch_id = mch_id;
    }

    public String getAuth_code() {
        return auth_code;
    }

    public void setAuth_code(String auth_code) {
        this.auth_code = auth_code;
    }

    public String getNonce_str() {
        return nonce_str;
    }

    public void setNonce_str(String nonce_str) {
        this.nonce_str = nonce_str;
    }
}
